
/***************************************************************************************
****************************************************************************************
* FILE		: common.h
* Description	: 
*			  
* Copyright (c) 2020 by Simlife. All Rights Reserved.
* 
* History:
* Version		Name		Date				Description
   0.1		Alen			2020/05/07		Initial Version
   
****************************************************************************************
****************************************************************************************/

#ifndef _COMMON_H_
#define _COMMON_H_

//== adc
#define START_ADC() (_adcen = 1)
#define STOP_ADC() (_adcen = 0)

//_sadc0 register ADCpin 	//AN7~AN0
#define adcAn0 B0011_0000
#define adcAn1 B0011_0001
#define adcAn2 B0011_0010
#define adcAn3 B0011_0011
#define adcAn4 B0011_0100
#define adcAn5 B0011_0101
#define adcAn6 B0011_0110
#define adcAn7 B0011_0111

#define CLEAN_ADC_PIN_CHOOSE() (_acerl = B0000_0000)

#define GOTO_SLEEP_TIME 10

extern U16 getAdc12Bit(void);
extern void systemPower(U8 status);
extern void modeChange(void);
extern void modeProcess(void);
extern void controlCloseSystem(void);
extern void vibrationStengthAdd(void);
#endif /*_COMMON_H_*/
